
<div class="content"> <!-- Content start -->
<p id="notice"><%= notice %></p>

<p>
  <b>Number:</b>
  <%= @wall.number %>
</p>
<p>
  <b>Name:</b>
  <%= @wall.name %>
</p>
<%= link_to 'Editieren', edit_wall_path(@wall) if @user.is_schorsch? %>
<%= link_to 'Zurück', walls_path %>


<table>
<% @wall.chains.each do |chain| %>
  <tr>
    <td><b>Umlenker</b></td>
    <td><b><%= chain.number %></b></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
		<tr>
    		<td>Name</td>
    		<td>Geschraubt</td>
    		<td>Grad</td>
    		<td>Umlenker</td>
    		<td>Wand</td>
    		<td>Farbe</td>
    		<td>Bauarbeiter</td>
    		<td>Eingebort</td>
    		<td>Umschrauben?</td>
    		<td>Kommentare</td>
    		<td></td>  
    		<td></td>
    		<td></td>
  		</tr>

  <% chain.routes.each do |route| %>
  <tr>
		<td><%= route.name %></td>
		<td><%= route.build %></td>
		<td><%= route.grade.grade %></td>
		<td><%= route.chain.number %></td>
		<td><%= route.chain.wall.to_s %></td>
		<td><%= route.color.name %></td>
		<td><%= route.workers.collect{|x| x.name}.join(", ") %></td>
		<td><span class="<%= route.existent ? "greenlabel" : "redlabel" %>"><%= route.existent ? "Ja" : "Nein" %></span></td>
		<td><%= display_redo_route(route) %></td>
		<td><%= route.comments.length > 0 ? route.comments.length : "Keine" %></td>
		<td><%= link_to 'Anzeigen', route %></td> 
		<td><% if @user.is_admin? || @user.is_creator?(route) %><%= link_to 'Editieren', edit_route_path(route) %><% end %></td> 
		<td><% if @user.is_admin? %><%= link_to 'Loeschen', route, :confirm => 'Are you sure?', :method => :delete %><% end %></td>
	</tr>
 
  <% end %>
<% end %>
</table>

</div>
